//
//  KLServiceCenter.h
//  KoalaUtilKit
//
//  Created by Tommy on 15/1/21.
//  Copyright (c) 2015年 Koala Team. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "KLSingleton.h"


#define KLRegisterInterface(obj,protocol) [[KLRegisterCenter sharedInstance] register:obj forKey:protocol]
#define KLQueryInterface(protocol)        [[KLRegisterCenter sharedInstance] objectForKey:protocol]



@interface KLRegisterCenter : NSObject
KLDEC_SINGLETON(KLRegisterCenter);

- (void)register:(id)object forKey:(Protocol*)key;
- (id)removeObjectForKey:(Protocol*)key;
- (id) objectForKey:(Protocol*)key;
- (BOOL)hasObjectForKey:(Protocol*)key;

@end
